import { createParamDecorator, ExecutionContext } from '@nestjs/common';

export const YuicDecorator = createParamDecorator(
  (param: string, ctx: ExecutionContext) => {
    const request = ctx.switchToHttp().getRequest();
    console.log('yuicDe', request);
    return request.yuicInfo[param] ?? request.yuicInfo;
  },
);
